// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   TagCreateController.java

package dale.web.tag.controller;

import dale.web.tag.domain.Tag;
import dale.web.tag.service.TagService;
import org.springframework.validation.BindingResult;

public class TagCreateController
{

    public TagCreateController(TagService service)
    {
        this.service = service;
    }

    public Tag get()
    {
        return new Tag();
    }

    public String post(Tag tag, BindingResult result)
    {
        if(result.hasErrors())
        {
            return "/tag/create";
        } else
        {
            service.create(tag);
            return "redirect:/tag/search";
        }
    }

    private TagService service;
}
